Skip to content

feat(atlas-search): wire source registry into serving paths (#3125 slice 7) - #14204

Merged
dezren39 merged 1 commit into
mainfrom
item-work-1/3125-slice7-serving-wiring
Nov 24, 2026
Merged

dezren39 merged 1 commit into
mainfrom
item-work-1/3125-slice7-serving-wiring

Conversation

@dezren39

@dezren39 dezren39 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Summary

#3125 slice 7 — the serving-side wiring named as the next slice when slice 6 (#14036) landed: thread the catalog/source-registry path from CLI/service config into ShardedBackend::with_source_registry, so served get-chunk responses carry occurrence attribution (root_id).

  • atlas-core source_registry::open_source_registry(path): opens the registry database at a path (creating the file and tables when absent) and returns the connection the builder consumes. Additive only, like registration itself. Re-exported from the crate root.
  • atlas-search serve mode: new service-config key source_registry (path). It is validated in load_service_settings — empty is an error, and setting it without shards is an error (attribution rides the shard fan-out; a registry nothing consumes must not be silently dropped). cmd_serve opens it and attaches it to the sharded backend.
  • atlas-search standalone search: new --source-registry <path> flag (env ATLAS_SOURCE_REGISTRY), mirroring --shards/ATLAS_SHARDS. Without --shards it fails up front with exit 2; with --shards it attaches to the fan-out backend.
  • No-registry behavior is byte-identical to before: occurrence rows stay unattributed and the root_id key stays absent (slice 6's contract, re-pinned by the existing occurrences tests).

Out of scope, unchanged: standalone get-chunk has no shard path today (it runs on the monolith backend), so there is nothing to attach there; the phase-2/3 laptop data backfills remain laptop-state work, per the notes on #3125.

Evidence

Ran on the laptop at a9c577f299c (base 4d9952d0faa), builds through fleet-build-lock:

  • cargo test -p atlas-core --test source_registry — 8/8, including the new oracle open_source_registry_creates_then_reopens_with_rows_intact: a fresh path resolves nothing; rows registered through one open still resolve after close + reopen by path (oracle: slice 5's exact-match resolution contract).
  • cargo test -p atlas-core --test occurrences — 6/6 (slice 6 attribution contract unchanged).
  • cargo test -p atlas-search service_config — 3/3, including the new service_config_source_registry_round_trips: config with shards + source_registry lands the path on ServeSettings; without shards it errors; empty errors.
  • Full suites: cargo test -p atlas-core -p atlas-search — 459 passed, 0 failed.
  • cargo fmt --all -- --check — clean.

Merge Danger

Low. All new behavior is opt-in behind a config key / CLI flag that default to absent; with them absent, construction paths are the pre-slice ones. The one behavior change for existing configs: a service config that (invalidly) carried an unknown source_registry key before would now be read — no shipped config sets it. Registry opening can create the registry tables in the named catalog file (the registry's documented additive ensure); it never alters existing rows.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T08:22:50Z",
    "session_id": null,
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/worktrees/item-work-1-3125",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/worktrees/item-work-1-3125",
      "repo": "developing-today/code",
      "branch": "item-work-1/3125-slice7-serving-wiring",
      "sha": "a9c577f299ca5761b2de5c46ab7cf2a4fade2bd8"
    },
    "auth_subject": "oc-code-06",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 merged commit f07e71f into main Nov 24, 2026
1 check passed
@dezren39
dezren39 deleted the item-work-1/3125-slice7-serving-wiring branch November 24, 2026 08:23
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant